Create A/B Test
curl --request POST \
--url https://api.sophra.org/api/cortex/ab-test/create \
--header 'Content-Type: application/json' \
--data '
"{\n \"name\": \"{{variate_test_name}}\",\n \"description\": \"{{variate_test_description}}\",\n \"variants\": [\n {\n \"id\": \"{{variate_test_id}}\",\n \"name\": \"Control Group\",\n \"allocation\": {{variate_test_allocation}},\n \"weights\": {\n \"title\": {{variate_test_weights_title}},\n \"content\": {{variate_test_weights_content}}\n }\n },\n {\n \"id\": \"variant_a\",\n \"name\": \"{{variate_a}}\",\n \"allocation\": {{variate_test_allocation}},\n \"weights\": {\n \"title\": {{variate_test_weights_title}},\n \"content\": {{variate_test_weights_content}}\n }\n }\n ]\n}"
'Cortex > A/B Testing
Create A/B Test
POST
/
cortex
/
ab-test
/
create
Create A/B Test
curl --request POST \
--url https://api.sophra.org/api/cortex/ab-test/create \
--header 'Content-Type: application/json' \
--data '
"{\n \"name\": \"{{variate_test_name}}\",\n \"description\": \"{{variate_test_description}}\",\n \"variants\": [\n {\n \"id\": \"{{variate_test_id}}\",\n \"name\": \"Control Group\",\n \"allocation\": {{variate_test_allocation}},\n \"weights\": {\n \"title\": {{variate_test_weights_title}},\n \"content\": {{variate_test_weights_content}}\n }\n },\n {\n \"id\": \"variant_a\",\n \"name\": \"{{variate_a}}\",\n \"allocation\": {{variate_test_allocation}},\n \"weights\": {\n \"title\": {{variate_test_weights_title}},\n \"content\": {{variate_test_weights_content}}\n }\n }\n ]\n}"
'Body
application/json
The body is of type object.
Response
200 - application/json
Successful response
⌘I

